import java.util.Random;
import java.util.Scanner;

public class caiquan {
    public static void main(String[] args) {
        System.out.println("程序已启动");
        System.out.println("请选择1.剪刀 2.石头 3.布");
        int a = 0;
        int b = 0;
        for (int i = 1; i <= 5; i++) {
            for (int d = 1; d <= 5; d++) {
                System.out.println("第" + d + "局");
                Scanner reader = new Scanner(System.in);
                int randomNumber = new Random().nextInt(4);
                int quan = 0;
                quan = reader.nextInt() - randomNumber;


                if (quan == 0) {
                    System.out.println("打平了！");
                    a = a + 1;
                } else if (quan == -1 || quan == 2) {
                    System.out.println("你输了！");

                } else {
                    System.out.println("你赢了！");
                    b = b + 1;
                }
                System.out.println("你赢了" + b + "局，" + "平了" + a + "局");
            }

        }
    }
}